# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-boofuzz
_pkgname=boofuzz
pkgver=0.4.2
pkgrel=4
pkgdesc='Boofuzz is a fork of Sulley fuzzing framework and aims for extensibility. The goal: fuzz everything.'
arch=('any')
url='https://pypi.org/project/boofuzz/'
license=('GPL2')
depends=( 'python' 'python-attrs' 'python-backports.shutil-get-terminal-size'
          'python-click' 'python-flask' 'python-future' 'impacket'
          'python-psutil' 'python-pyserial' 'python-pydot' 'python-six'
          'python-tornado')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d872d5939dbf63c6500aca06d64e32cf321ef66aae770643a3a93ccf1c75e0931cb1521b13431f2ca1d874922fb0bc061ef45978df3d4100d07eaf019f1a7041')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.rst
  install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.txt

  python setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

